Platform Explorer / Nuxeo Platform 2021.61

Bundle Group org.nuxeo.coldstorage

Documentation

  • README.md

    Build Status

    Nuxeo Cold Storage

    The Nuxeo Cold Storage addon allows the storage of the document main content in a cold storage. This can be needed for archiving, compliance, etc.

    For more details around functionalities, requirements, installation and usage please consider this addon official documentation.

    Context

    Nuxeo Cold Storage is an addon that can be plugged to Nuxeo.

    It is bundled as a marketplace package that includes all the backend and frontend contributions needed for Nuxeo Platform and Nuxeo Web UI.

    Sub Modules Organization

    • ci: CI/CD files and configurations responsible to generate preview environments and running Cold Storage pipeline
    • nuxeo-coldstorage: Backend contribution for Nuxeo Platform
    • nuxeo-coldstorage-package: Builder for nuxeo-coldstorage marketplace package. This package will install all the necessary mechanisms to integrate Cold Storage capabilities into Nuxeo
    • nuxeo-coldstorage-web: Frontend contribution for Nuxeo Web UI

    Build

    Nuxeo's ecosystem is Java based and uses Maven. This addon is not an exception and can be built by simply performing:

    mvn clean install
    

    This will build all the modules except ci and generate the correspondent artifacts: .jar files for the contributions, and a `.zip file for the package.

    DB configuration

    Create the following db indexes for an optimal functioning of the addon:

    • coldstorage:beingRetrieved
    • coldstorage:coldContent/digest
    • file:content/digest
    • ecm:mixinTypes

    Typically on MongoDB:

    db.default.createIndex(
       { "coldstorage:beingRetrieved": 1 },
       { partialFilterExpression: { "coldstorage:beingRetrieved": true } }
    );
    
    db.default.createIndex(
       { "content.digest": 1 }
    );
    
    db.default.createIndex(
       { "coldstorage:coldContent.digest": 1 }
    );
    
    db.default.createIndex(
      { "ecm:mixinTypes": 1 }
    );
    

    Configuration properties

    • nuxeo.coldstorage.check.retrieve.state.cronExpression : cron expression to define the frequency of the execution of the process to check if a document has been retrieved. Default value is 0 7 * ? * * * i.e. every hour at the 7th minute.
    • nuxeo.bulk.action.checkColdStorageAvailability.scroller : scroller implementation to be used to query documents being retrieved. elastic value can be set to relieve the regular back-end.
    • nuxeo.coldstorage.numberOfDaysOfAvailability.value.default : number of days a document remains available once it has been retrieved. Default value is 1.
    • nuxeo.coldstorage.thumbnailPreviewRequired : is a thumbnail required to be used as a place holder to send a document to Cold Storage. Default value is true.

    Frontend Contribution

    nuxeo-coldstorage-web module is also generating a .jar file containing all the artifacts needed for an integration with Nuxeo's ecosystem. Nevertheless this contribution is basically generating an ES Module ready for being integrated with Nuxeo Web UI.

    It is possible to isolate this part of the build by running the following command:

    npm run build
    

    It is using rollup.js to build, optimize and minify the code, making it ready for deployment.

    Test

    In a similar way to what was written above about the building process, it is possible to run tests against each one of the modules.

    Here, despite being under the same ecosystem, the contributions use different approaches.

    Backend Contribution

    Unit Tests

    mvn test
    

    A couple of unit test classes are designed to run with a blob provider using a real s3 bucket. In order to run them locally, you must define the following system properties:

    • nuxeo.s3storage.awsid : your AWS_ACCESS_KEY_ID
    • nuxeo.s3storage.awssecret : your AWS_SECRET_ACCESS_KEY
    • nuxeo.test.s3storage.awstoken : optional depending on your aws credentials type
    • nuxeo.test.s3storage.region: your AWS_REGION
    • nuxeo.s3storage.bucket : the name of the S3 bucket

    Frontend Contribution

    Unit Tests

    npm run test
    

    Web Test Runner is the test runner used to run this contribution unit tests. The tests run against bundled versions of Chromium, Firefox and Webkit, using Playwright

    Functional Tests

    npm run ftest
    

    To run the functional tests, Nuxeo Web UI Functional Testing Framework is used. Due to its inner dependencies, it only works using NodeJS lts/dubnium, i.e., v10.

    Development Workflow

    Frontend

    Disclaimer: In order to contribute and develop Nuxeo Cold Storage UI, it is assumed that there is a Nuxeo server running with Nuxeo Cold Storage package installed and properly configured according the documentation above.

    Install Dependencies

    npm install
    

    Linting & Code Style

    The UI contribution has linting to help making the code simpler and safer.

    npm run lint
    

    To help on code style and formatting the following command is available.

    npm run format
    

    Both lint and format commands run automatically before performing a commit in order to help us keeping the code base consistent with the rules defined.

    Integration with Web UI

    Despite being an "independent" project, this frontend contribution is build and aims to run as part of Nuxeo Web UI. So, most of the development will be done under that context. To have the best experience possible, it is recommended to follow the Web UI Development workflow on repository's README.

    Since it already contemplates the possibility of integrating packages/addons, it is possible to serve it with NUXEO_PACKAGES environment variable pointing to the desired packages/addons.

    CI/CD

    Continuous Integration & Continuous Deployment(and Delivery) are an important part of the development process.

    Nuxeo Cold Storage integrates Jenkins pipelines for each maintenance branch, for LTS (fast track) and also for each opened PR.

    The following features are available:

    • Each PR merge to 10.10/lts-2021/lts-2023 branch will generate a "release candidate" package

    Localization Management

    Nuxeo Cold Storage manages multilingual content with a Crowdin integration.

    The Crowdin GitHub Actions workflow handles automatic translations and related pull requests.

    About Nuxeo

    The Nuxeo Platform is an open source customizable and extensible content management platform for building business applications. It provides the foundation for developing document management, digital asset management, case management application and knowledge management. You can easily add features using ready-to-use addons or by extending the platform using its extension point system.

    The Nuxeo Platform is developed and supported by Nuxeo, with contributions from the community.

    Nuxeo dramatically improves how content-based applications are built, managed and deployed, making customers more agile, innovative and successful. Nuxeo provides a next generation, enterprise ready platform for building traditional and cutting-edge content oriented applications. Combining a powerful application development environment with SaaS-based tools and a modular architecture, the Nuxeo Platform and Products provide clear business value to some of the most recognizable brands including Verizon, Electronic Arts, Sharp, FICO, the U.S. Navy, and Boeing. Nuxeo is headquartered in New York and Paris. More information is available at www.nuxeo.com.

Bundles